﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
 public   class 横向质心测量记录表 : TableBase
    {
        public 横向质心测量记录表(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort)
        {
            SerialNum = serialNum;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;
            Sort = sort;
        }
        public override string FormName { get; protected set; } = "横向质心测量记录表";
        /// <summary>
        /// 记录要求
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="recordLocation"></param>
        /// <returns></returns>
        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity, string recordLocation)
        {
            entity.SetRecordLocation(recordLocation, "位置", false, true, 1);

            return entity;
        }
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="firstMeasuredValues"></param>
        /// <param name="secondMeasuredValues"></param>
        /// <param name="thirdMeasuredValues"></param>
        /// <param name="fourthMeasuredValues"></param>
        /// <returns></returns>
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity, string firstMeasuredValues,string secondMeasuredValues, string thirdMeasuredValues,string fourthMeasuredValues)
        {
            entity.SetFirstMeasuredValues(firstMeasuredValues, "后支点称重", true, true, 0);
            entity.SetSecondMeasuredValues(secondMeasuredValues, "后支点有效", true, true, 0);
            entity.SetThirdMeasuredValues(thirdMeasuredValues, "前支点称重",true,true,0);
            entity.SetFourthMeasuredValues(fourthMeasuredValues, "前支点有效",true,true,0);
            return entity;
        }
    }
}
